/**
 * @author bipul_sinha
 * @version 1.0
 * @created 10th November, 2010.
 *
 * AbstractEntity
 *
 * Copyright @ 2010 by 
 * All Rights Reserved.
 * CONFIDENTIAL AND TRADE SECRET
 */
package com.ces.knacky.framework.model;

import java.util.Date;

import com.ces.knacky.model.UserTable;
/**
 * It is used to accomplish the contract with <B>IUpdatable</B> and <B>ITimestampable</B> interfaces.
 * This class should be inherited in case of POJO has property such as User and Create and Update 
 * time. 
 * 
 * @author bipul_sinha
 *
 */
public abstract class AbstractEntity extends AbstractBaseEntity implements IUpdatable, ITimestampable {
	/**
	 * Represents User who has made changes in the current POJO object. 
	 */
	protected UserTable user;
	/**
	 * Represents the time when object/entity is created. 
	 */
	protected Date createTime;
	/**
	 * Represents the time when object/entity is updated. 
	 */	
	protected Date updateTime;
	 /**
     * This method provides a contract to log user details who has made changes in the persistent 
     * object.
     * 
     * @return 	Integer
     * 			Represents user of the current persistent object.	
     */
	public UserTable getUser() {
		return user;
	}

    /**
     * This method provides a contract to log user details who has made changes in the persistent 
     * object.
     * 
     * @param 	user
     * 			Represents user of the current persistent object.
     */
	public void setUser(UserTable user) {
		this.user = user;
	}
	/**
	 * This method provides a contract to return date time of the object creation.
	 * 
	 * @return 	Date
	 * 			Represents date time of the object creation. 
	 */
	public Date getCreateTime() {
		return createTime;
	}
    /**
     * This method provides a contract to set the date time during object creation.
     * 
     * @param 	createTime
     * 			Represents date time of the object creation. 
     */
	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}
	/**
	 * This method provides a contract to return date time of the object update operation.
	 * 
	 * @return 	Date
	 * 			Represents date time when the object was last updated. 
	 */
	public Date getUpdateTime() {
		return updateTime;
	}
    /**
     * This method provides a contract to set the date time during object update process.
     * 
     * @param 	updateTime
     * 			Represents date time when the object is updated. 
     */
	public void setUpdateTime(Date updateTime) {
		this.updateTime = updateTime;
	}
}

